package com.ls.netty.peotocoltcp.client;

import com.ls.netty.peotocoltcp.coder.MyMessgeEncoder;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;

public class MyClientInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(new MyMessgeEncoder());
        pipeline.addLast(new MyCIientHandler());
    }
}
